<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>
        /* 屏幕  >320   <500 */
        @media screen and (min-width:320px) and (max-width:500px) {
            body {
                background-color: #f00;
            }
        }

        /* 屏幕  >500  <1000 */
        @media screen and (min-width:500px) and (max-width:1000px) {
             body {
                background-color: #ff0;
            }
        }

        /* 屏幕  >1000 */
        @media screen and (min-width:1000px)  {
            body {
                background-color: #f0f;
            }
        }
    </style>
</head>

<body>

</body>

</html>